package com.dmg.service.impl;

import com.dmg.config.DataSourceContextHolder;
import com.dmg.dao.PeiZhiMapper;
import com.dmg.entity.PeiZhi;
import com.dmg.service.PeiZhiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Slf4j
@Service
public class PeiZhiServiceImpl implements PeiZhiService {

    @Autowired
    private PeiZhiMapper peiZhiMapper;


    @Override
    public List<PeiZhi> getList() {
        String zuHuId = DataSourceContextHolder.getDataSourceKey();
        log.info("bb-当前租户id:{}",zuHuId);
        return peiZhiMapper.getList();
    }
}
